package 链表;
/*
 * https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list/submissions/
 * */
public class _83_删除排序链表中的重复元素 {
	public ListNode deleteDuplicates(ListNode head) {
		ListNode newHead = head;
		while (head != null) {
			ListNode tmp = head.next;
			while (tmp != null) {
				if (head.val == tmp.val) {
					head.next = head.next.next;
				}
				tmp = tmp.next;

			}
			head = head.next;
		}

		return newHead;
	}
}
